<?php

namespace app\http\middleware;

class Checklogin
{
    public function handle($request, \Closure $next)
    {
    	if(!session("?uname")){
    		return redirect('admin/index/login')->with('msg','请先登陆')->with('code',0);
    	}
    	return $next($request);
    }
}
